﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BackOfficeApplication.Models
{
    public class MediaModel
    {
        public enum Position
        {
            thumnail = 0,
            first = 1,
            second = 2,
            third = 3,
            fourth = 4
        }

        public int Id { get; set; }
        public string Capiton { get; set; }
        public string Source { get; set; }
        public ComboBoxDto SelectedPosition { get; set; }
        public BindingList<ComboBoxDto> Positions { get; set; }

        public MediaModel()
        {
            SelectedPosition = new ComboBoxDto { Value = -1, Display = "-----Please Select Position-----" };
            var dtos = new List<ComboBoxDto>();
            dtos.Add(SelectedPosition);
            dtos.Add(new ComboBoxDto { Value = (int)Position.thumnail, Display = Position.thumnail.ToString() });
            dtos.Add(new ComboBoxDto { Value = (int)Position.first, Display = Position.first.ToString() });
            dtos.Add(new ComboBoxDto { Value = (int)Position.second, Display = Position.second.ToString() });
            dtos.Add(new ComboBoxDto { Value = (int)Position.third, Display = Position.third.ToString() });
            dtos.Add(new ComboBoxDto { Value = (int)Position.fourth, Display = Position.fourth.ToString() });

            Positions = new BindingList<ComboBoxDto>(dtos);
        }
    }
}
